<template>
	<view class="Cluedetails-box">
		<view class="Cluedetails-top">
			<u-navbar :border-bottom="false" title="线索详情"  title-color="#333333" back-icon-color="#333333"></u-navbar>
		</view>
		<view class="Cluedetails-auto">
			<view class="information">
				<view class="Cluedetails-auto-text">XS004 周晓明 18079442429</view>
				<view class="Cluedetails-auto-distribute">当前状态：已分发</view>
			</view>
			<view class="Cluedetails">
				<view class="Cluedetails-writtenwords">
					<view class="Cluedetails-writtenwords-img">
						<u-icon size="40" name="https://cdn.uviewui.com/uview/example/button.png"></u-icon>
					</view>
					<view class="Cluedetails-writtenwords-text">
						线索详情
					</view>
				</view>
				<view class="Cluecontent">
					<view class="Cluecontent-box">
						<view class="Cluecontent-left">录单人</view>
						<view class="Cluecontent-right">市场</view>
					</view>
					<view class="Cluecontent-box" v-for="item in 10" >
						<view class="Cluecontent-left">意向专业</view>
						<view class="Cluecontent-right">语言培训/通用英语/成人新概念英语</view>
					</view>
					<view class="Cluecontent-box">
						<view class="Cluecontent-left">咨询其他机构</view>
						<view class="Cluecontent-right">否</view>
					</view>
				</view>
			</view>
		</view>
		<view class="Cluedetails-bottom">
			<view class="Cluedetails-bottom-switch">
				<u-tabs-swiper name="cate_name" count="cate_count" :list="list" active-color="#333333" :is-scroll="false" :current="current" @change="change"></u-tabs-swiper>
			</view>
			<swiper class="switch-box" :current="current">
				<swiper-item class="Returnvisitrecord">
					<scroll-view scroll-y class="Returnvisitrecord1" v-for="(item, index) in detailHf" :key="index">
						<view class="Returnvisitrecord-box">
							<view class="Returnvisitrecord-tb">
								<u-icon size="35" name="https://cdn.uviewui.com/uview/example/button.png"></u-icon>
							</view>
							<view class="Returnvisitrecord-sj">
								回访时间：{{ item.create_time }}
							</view>
						</view>
						<view class="Returnvisitrecord-text">
							<view class="Returnvisitrecord-text-box">
								<view class="Returnvisitrecord-text-box-title">
									<view class="Nointention">{{ item.status }}</view>
									<view class="title">{{ item.realname }}   {{ item.title }}</view>
								</view>
								<view class="Returnvisitrecord-text-box-content">备注:{{ item.remark }}</view>
							</view>
						</view>
					</scroll-view>
				</swiper-item>
				<swiper-item class="Distributionagencies">
					<scroll-view scroll-y class="Distributionagencies1">
						<view class="Distributionagencies-box" v-for="(item, index) in detailJg" :key="index">
							<view class="Distributearow">
								<view class="Distributiontime">分发时间：{{ item.create_time }}</view>
								<view class="Workorderfeedback" @click="Workorderfeedback1(item.agency_id)"><u-icon size="35" class="Workorderfeedback-tb" name="https://cdn.uviewui.com/uview/example/button.png"></u-icon>工单反馈</view>
							</view>
							<view class="Suspectedregistrationrow">
								<view class="Organizationpicture">
									<image src="http://1812.img.pp.sohu.com.cn/images/blog/2009/11/18/18/8/125b6560a6ag214.jpg" class="Organizationpicture-img"/>
									<view class="Organizationpicture-text">{{ item.send_count_text }}</view>
								</view>
								<view class="Organizationname-box">
									<view class="Organizationname">{{ item.title }}</view>
									<view class="Viewtime">查看时间：{{ item.view_time_text }}</view>
								</view>
								<view class="Suspectedregistration">
									<view class="Suspectedregistrationwz" @click="Suspectedregistration1(item.id)">疑似报名</view>
								</view>
							</view>
						</view>
					</scroll-view>
				</swiper-item>
			</swiper>
		</view>
		<Suspectedregistration ref="Suspectedregistration"></Suspectedregistration>
		<Workorderfeedback ref="Workorderfeedback"></Workorderfeedback>
	</view>
</template>

<script>
	import Suspectedregistration from '../../../components/Suspectedregistration/index.vue'
	import Workorderfeedback from '../../../components/Workorderfeedback/index.vue'
	export default {
		components:{ Workorderfeedback,Suspectedregistration },
		data() {
			return {
				list: [{
					cate_name: '回访记录'
				}, {
					cate_name: '分发机构'
				}],
				current: 0,
				id: '',
				detail: {},
				detailHf: [],
				detailJg: []
			}
		},
		onLoad(e) {
			this.id = e.id
		},
		mounted() {
			this.getDetail()
			this.getDetailHf()
			this.getDetailJG()
		},
		methods: {
			getDetail () {
				this.$request('', '/manageApi/v1/clueLine', 'GET', {
					id: this.id
				}, {
				}).then(res => {
					this.detail = res.data.data
				})
			},
			getDetailHf () {
				this.$request('', '/manageApi/v1/visitRecord', 'GET', {
					page: 1,
					limit: 10,
					status: '', // 线索状态 状态 1-无意向 2-考虑中 3-已预约 4-已试听 5-已报名 6-疑似报名
					realname: '', //回访人
					title: '', // 机构名称
					create_time: '', // 回访时间 json
					id: this.id
				}, {
				}).then(res => {
					this.detailHf = res.data.data
				})
			},
			getDetailJG () {
				this.$request('', '/manageApi/v1/distributeAgency', 'GET', {
					page: 1,
					limit: 10,
					clue_id: '', // 线索状态 状态 1-无意向 2-考虑中 3-已预约 4-已试听 5-已报名 6-疑似报名
					title: '', // 机构名称
					create_time: '', // 回访时间 json
					clue_id: this.id
				}, {
				}).then(res => {
					this.detailJg = res.data.data
				})
			},
			Suspectedregistration1 (id) {
				this.$refs.Suspectedregistration.getOpen(id)
			},
			Workorderfeedback1 (id) {
				this.$refs.Workorderfeedback.getOpen(id)
			},
			change(index) {
				this.current = index;
			},
		}
	}
</script>

<style>
	.Cluedetails-box{}
	.Cluedetails-top{}
	.Cluedetails-auto{}
	.information{
		color: #fff;
		padding: 30upx;
		padding-top: 90upx;
		height: 387upx;
		text-align: center;
		background-color: #91C853;
	}
	.Cluedetails-auto-text{
		font-size: 30upx;
		font-weight: bold;
	}
	.Cluedetails-auto-distribute{
		color: #F7FCFF;
		font-size: 24upx;
		margin-top: 22upx;
		font-weight: bold;
	}
	.Cluedetails{
		margin: 30upx;
		margin-bottom: 50upx;
		padding: 30upx 25upx;
		margin-top: -120upx;
		background: #FFFFFF;
		box-shadow: 0px 0px 32px 0px rgba(153, 153, 153, 0.3);
		border-radius: 10upx;
	}
	.Cluedetails-writtenwords{
		display: flex;
		align-items: center;
	}
	.Cluedetails-writtenwords-img{
		font-size: 0;
	}
	.Cluedetails-writtenwords-text{
		margin-left: 15upx;
		font-size: 30upx;
		font-weight: bold;
		color: #91C853;
	}
	.Cluecontent{
		overflow: hidden;
		margin-top: 30upx;
		border-radius: 10upx;
		border: 1px solid #D2D2D2;
	}
	.Cluecontent-box{
		display: flex;
		align-items: center;
		background-color: #F8F8F8;
	}
	.Cluecontent-left{
		width: 30%;
		font-size: 26upx;
		font-weight: 500;
		color: #666666;
		padding: 20upx;
		border-bottom: 1px solid #F8F8F8;
	}
	.Cluecontent-right{
		width: 70%;
		padding: 20upx;
		font-size: 26upx;
		font-weight: 500;
		color: #333333;
		background-color: #fff;
		border-bottom: 1px solid #D2D2D2;
	}
	.Cluecontent-box:nth-last-child(1) .Cluecontent-left{
		border-bottom: 0;
	}
	.Cluecontent-box:nth-last-child(1) .Cluecontent-right{
		border-bottom: 0;
	}
	.Cluedetails-bottom{}
	.Cluedetails-bottom-switch{
		margin: 0 150upx;
	}
	.Returnvisitrecord{
		height: 400px;
		padding: 30upx;
		box-sizing: border-box;
		-webkit-box-sizing: border-box;
		background-color: #F7FCFF;
	}
	.switch-box{
		flex: 1;
		height: 720px;
	}
	.Returnvisitrecord-box{
		display: flex;
	}
	.Returnvisitrecord-sj{
		width: 100%;
		margin-left: 30upx;
		font-size: 24upx;
		font-weight: 500;
		color: #666666;
		display: flex;
		align-items: center;
	}
	.Returnvisitrecord-tb,.Returnvisitrecord-img{
		font-size: 0;
	}
	.Returnvisitrecord-text{
		padding-left: 44upx;
		padding-top: 30upx;
		padding-bottom: 48upx;
		margin-left: 20upx;
		border-left: 2upx solid #E4E8EB;
	}
	.Returnvisitrecord1:nth-last-child(1) .Returnvisitrecord-text{
		padding-bottom: 30upx;
	}
	.Returnvisitrecord-text-box{
		padding: 30upx;
		background-color: #fff;
		box-shadow: 0px 0px 10px 0px rgba(153, 153, 153, 0.3);
		border-radius: 10upx;
	}
	.Returnvisitrecord-text-box-title{
		display: flex;
		align-items: center;
	}
	.Nointention{
		padding: 10upx 20upx;
		background-color: #F08200;
		font-size: 24upx;
		font-weight: 500;
		color: #FFFFFF;
		border-radius: 10upx;
		box-shadow: 0px 0px 10px 0px rgba(255, 185, 103, 0.9);
	}
	.title{
		font-size: 30upx;
		font-weight: bold;
		color: #333333;
		padding-left: 20upx;
	}
	.Returnvisitrecord-text-box-content{
		font-size: 26upx;
		font-weight: 500;
		color: #666666;
		text-align: justify;
		margin-top: 20upx;
		line-height: 40upx;
	}
	.Distributionagencies{
		padding: 30upx;
		box-sizing: border-box;
		-webkit-box-sizing: border-box;
	}
	.Distributionagencies1{
		
	}
	.Distributionagencies-box{
		padding: 40upx 0;
		border-bottom: 1px solid #EEEEEE;
	}
	.Distributionagencies-box:nth-last-child(1){
		border-bottom: 0;
	}
	.Distributearow{
		display: flex;
	}
	.Distributiontime{
		width: 100%;
		font-size: 24upx;
		font-weight: 500;
		color: #333333;
	}
	.Workorderfeedback{
		display: flex;
		width: 30%;
		font-size: 24upx;
		font-weight: 500;
		color: #666666;
		justify-content: flex-end;
	}
	.Workorderfeedback-tb{
		margin-right: 16upx;
	}
	.Suspectedregistrationrow{
		display: flex;
		margin-top: 35upx;
	}
	.Organizationpicture{
		width: 26%;
		overflow: hidden;
		font-size: 0;
		position: relative;
	}
	.Organizationpicture-img{
		width: 120upx;
		height: 120upx;
		border-radius: 10upx;
		border: 1px solid #77C1B1;
	}
	.Organizationpicture-text{
		top: 6upx;
		left: -40upx;
		width: 140upx;
		height: 50upx;
		color: #fff;
		font-size: 20upx;
		display: flex;
		letter-spacing: 4upx;
		transform: rotate(-46deg);
		align-items: center;
		justify-content: center;
		background-color: #91C853;
		position: absolute;
	}
	.Organizationname-box{
		display: flex;
		flex-flow: row wrap;
		align-items: center;
		margin: 0 30upx;
	}
	.Organizationname{
		width: 100%;
		font-size: 28upx;
		font-weight: bold;
		color: #333333;
	}
	.Viewtime{
		width: 100%;
		font-size: 24upx;
		font-weight: 500;
		color: #999999;
	}
	.Suspectedregistration{
		width: 30%;
		display: flex;
		align-items: center;
		justify-content: center;
	}
	.Suspectedregistrationwz{
		color: #91C853;
		font-size: 24upx;
		font-weight: 500;
		padding: 15upx 20upx;
		border-radius: 28upx;
		background-color: #FAFAFA;
	}
	.Buttonfailure{
		font-size: 24upx;
		font-weight: 500;
		color: #999999 !important;
		background-color: inherit !important;
	}
	.Cluedetails-box /deep/ .u-scroll-bar{
		background-color: #91C853 !important;
	}
</style>
